package cn.ncupyh.soft;

public class BoyFriend {
//    定义一个数组,存储四个男朋友的对象
//    男朋友属性:姓名,年龄,性别,爱好
//    要求1:计算出四个女朋友的年龄平均值
//    要求2:统计比平均值低的有几个,并打印出个人信息

//    属性:
    private String name;
    private int age;
    private String gender;
    private String hobby;

//

//
    public BoyFriend() {
    }

    public BoyFriend(String name, int age, String gender, String hobby) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.hobby = hobby;
    }

//

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
//        Random r = new Random();
        this.hobby = hobby;
//        int i = r.nextInt(hobbys.length);
//        this.hobby=hobbys[i];
    }

}
